<?php

class UserAuthzDatabase
{
    public function Menu($userId)
    {
        Transaction::open();
        $db = new Repository('permissoes');
                
        $permissionList = $db->where('id', '=', $userId)
                        ->where('is_menu', 'is', 'TRUE')
                        ->load();
        
       
        Transaction::close();
    }
    
    public function getPermissionList($userId)
    {
        Transaction::open();
        $db = new Repository('Permissoes');
                
        $permissionList = $db->where('usuario_id', '=', $userId)
                        ->load();
        
       
        Transaction::close();
        return $permissionList;
    }
}

